<template>
	<view class="content">

		<view class="orderBox">
			<view class="act_title">添加车型品牌</view>
			<view class="act_title_en">ADD VEHICLE BRAND</view>
			<label>
				<view class="oredrline">
					<view class="linetit">车名:</view>
					<input @input="oninput" placeholder="请输入车名" />
				</view>
				<view class="btn" @click="glanceShopApply()">添加</view>
			</label>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				pinpai: '',
			}
		},
		onLoad() {},
		methods: {
			oninput(e) {
				this.pinpai = e.detail.value
			},
			glanceShopApply() {
				var that = this;
				var openid = uni.getStorageSync('openid');
				that.ran
					.request('api/Vehicle/addCar', {
						openid: openid,
						pinpai: that.pinpai,
					})
					.then(res => {
						if (res.code == 1) {
							uni.showToast({
								title: res.msg,
								icon: 'none'
							})
							setTimeout(function() {
								uni.navigateBack({
									delta: 1
								})
							}, 2000)
						} else {
							uni.showToast({
								title: res.msg,
								icon: 'none'
							})
						}
					});
			}
		}
	}
</script>

<style lang="scss">
	.content {
		width: 100vw;
		height: 100vh;
		background: linear-gradient(-180deg, #50abff, #3E6FEF);
		position: absolute;
		top: 0;
		left: 0;
	}

	.quantity_btn {
		display: flex;
		width: 50%;
		float: right;
		font-size: 50rpx;

		.add_quantity {
			text-align: center;
			width: 25%;
		}

		.input_quantity {
			// border-bottom: 1px solid #74bfe7;
			text-align: center;
			width: 40%;
			font-size: 30rpx;
		}

		.minus_quantity {
			text-align: center;
			width: 30%;
			font-size: 60rpx;
		}

	}

	.btn:active {
		background: linear-gradient(50deg, #3777af, #23408a);
	}

	.btn {
		width: 650rpx;
		line-height: 80rpx;
		height: 80rpx;
		color: #fff;
		background: linear-gradient(50deg, #50abff, #3E6FEF);
		text-align: center;
		margin: 40rpx auto;
		border-radius: 16rpx;
		font-size: 34rpx;
	}

	.orderBox {
		width: 650rpx;
		margin: 50rpx auto;
		padding: 50rpx 20rpx;
		background: #fff;
		border-radius: 20rpx;
		overflow: hidden;
		box-shadow: 1px 1px 1px #fff;

		.act_title {
			color: #50abff;
			text-align: center;
			font-size: 80rpx;
			font-weight: bold;
			margin-top: 20rpx;

		}

		.act_title_en {
			font-size: 34rpx;
			text-align: center;
			font-weight: bold;
			color: #50abff;
			margin-bottom: 60rpx;
		}

		.shop {
			background: #f0f2ff;
			border-radius: 16rpx;

			.shoptit {
				background: #3766f0;
				color: #fff;
				padding: 0 20rpx;
				display: inline-block;
				font-size: 18rpx;
				line-height: 40rpx;
				border-radius: 20rpx 0 40rpx 0;
			}

			.shopcont {
				padding: 20rpx;
				line-height: 1.5;
			}
		}

		.oredrline {
			overflow: hidden;
			line-height: 80rpx;
			background: #eee;
			border-radius: 10rpx;
			margin-top: 20rpx;
			padding: 0 20rpx;

			.linetit {
				width: 20%;
				float: left;
			}

			.linecont {
				width: 80%;
				float: left;
				line-height: 80rpx;
				height: 80rpx;
			}

			input {
				width: 80%;
				float: left;
				line-height: 80rpx;
				height: 80rpx;
			}
		}
	}
</style>